package com.zyh.inner;

public class InnerClassDemo1 {
    public static void main(String[] args) {
        outer.inner inner = new outer().new inner();
        System.out.println(inner.num);
        System.out.println(inner.innerNum);
        inner.method();
        inner.innerMethod();
    }
}

class outer {
    public int num = 10;
    public int outNum = 20;

    public void method() {
        System.out.println("我是外部类method方法");
    }

    public void outerMethod() {
        System.out.println("我是外部类outerMethod方法");
    }

    class inner {
        public int num = 100;
        public int innerNum = 200;

        public void method() {
            System.out.println("我是内部类method方法");
        }

        public void innerMethod() {
            System.out.println("我是内部类innerMethod方法");
        }
    }
}
